package nl.Viewer.SerializedObjects;

/**
 * Client-side deserialization of a job
 * 
 * @author Jeroen Verschuur
 * 
 */

public class Job {
   public long      jobId;
   protected Status status;
   protected String statusMessage = null;

   protected long   submitTime;
   protected long   startTime;
   protected long   endTime;

   protected int    pvThreads     = 0;

   public enum Status {
      WAITING, WORKING, FINISHED, FAILED
   };

   public long getEndTime() {
      return endTime;
   }

   public long getStartTime() {
      return startTime;
   }

   public long getSubmitTime() {
      return submitTime;
   }

   public Status getStatus() {
      return status;
   }

   public String toString() {
      return "Job[" + jobId + "/" + status + "/" + statusMessage + "/" + submitTime + "/" + startTime + "/" + endTime + "]";

   }

   public String getStatusMessage() {
      return statusMessage;
   }

   public int getPvThreads() {
      return pvThreads;
   }

}
